<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="apple-touch-icon-precomposed" href="/static/images/favicon.png" type="image/x-icon" />
        <link rel="shortcut icon" href="/static/images/favicon.png" type="image/x-icon" />
        <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
        <title>{{ title }}</title>

        <!-- Bootstrap -->
        <link href="/static/css/bootstrap.min.css" rel="stylesheet">
        <link href="/static/css/public.css" rel="stylesheet">
        <link rel="stylesheet" href="/static/jquery-ui-1.11.4/jquery-ui.css" type="text/css">

        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
        <script src="/static/js/html5shiv.3.7.2.min.js"></script>
        <script src="/static/js/respond.1.4.2.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div style="width:600px;margin:0px auto; text-align:center;margin-top:200px;">
            <form action="/dologin" method='post' class="form-horizontal" role="form" id="login_form">
                <div class="form-group">
                    <label class="col-sm-6 control-label">用户登陆</label><br><br><br>
                </div>
                <div class="form-group">
                    <label  class="col-sm-3 control-label">用户名: </label>
                    <div class="col-sm-5">
                        <input type="text" autocomplete="off" name="username" class="form-control" placeholder="请填写用户名">
                    </div>
                    <label id="name-error" class="error col-sm-3 control-label"  for="username"></label>
                </div>
                 <div class="form-group">
                    <label  class="col-sm-3 control-label">密码: </label>
                    <div class="col-sm-5">
                        <input type="password" autocomplete="off" name="userpass" class="form-control" placeholder="请填写密码">
                    </div>
                    <label id="name-error" class="error col-sm-3 control-label"  for="userpass"></label>
                </div>
              <div class="form-group">
                <div class="col-sm-offset-2 col-sm-7">
                  <button type="submit" class="btn btn-primary">登陆</button>
                </div>
              </div>
            </form>
        </div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/static/js/jquery-1.9.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/static/js/bootstrap.min.js"></script>
<script src="/static/js/jquery.validate.min.js"></script>
<script>
    $().ready(function() {
    $("#login_form").validate({
        rules: {
            username: {
                required: true,
                minlength:2
            },
            userpass: {
                required: true,
                minlength:2
            }
        },
        messages: {
            username: {
                required: "请输入用户名",
                minlength: "请输入至少2个字"
            },
            userpass: {
                required: "请输入密码",
                minlength: "请输入至少2个字"
            }
        }
    });
});
</script>











    </body>
</html>